package cn.lanqiao.springbootproject.entity;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class User {
    private int userId;
    @NotNull(message = "用户名不能为空")
    @Pattern(regexp = "\\w{4,10}",message = "用户名格式不正确")
    private String userName;
    private String password;
    private String email;
    private Date createTime;
}
